<template>
  <div class="iphoneSheb">
    <el-table
      ref
      :data="tableData"
      :style="{ fontSize: '26px' }"
      :row-style="{ height: '87px' }"
      :cell-style="{ padding: '0' }"
      @row-click="routerSheb"
      :header-cell-style="{
        fontSize: '24px',
        background: 'rgb(64, 158, 255)',
        color: '#fff',
      }"
    >
      <el-table-column prop="nub" label="序号"> </el-table-column>
      <el-table-column prop="name" label="设备名称"> </el-table-column>
    </el-table>
  </div>
</template>

<script>
export default {
  data() {
    return {
      tableData: [
        {
          nub: 1,
          name: "网带线一",
        },
        {
          nub: 2,
          name: "压蜡柱机",
        },
        {
          nub: 3,
          name: "放蜡柱机",
        },
        {
          name: "贴标机",
          nub: 4,
        },
        {
          name: "预热罩",
          nub: 5,
        },
        {
          name: "发泡蜡设备",
          nub: 6,
        },
        {
          name: "网带线二自动上线",
          nub: 7,
        },
        {
          nub: 8,
          name: "螺旋提升线",
        },
        {
          nub: 9,
          name: "自动上线",
        },
        {
          nub: 10,
          name: "网带线二",
        },
        {
          nub: 11,
          name: "工字封箱机",
        },
        {
          nub: 12,
          name: "一字封箱机",
        },
        {
          nub: 13,
          name: "穿灯芯机",
        },
        {
          nub: 14,
          name: "灌装机",
        },
        {
          nub: 15,
          name: "制冷系统",
        },
        {
          name: "网带线二自动下线",
          nub: 16,
        },
      ],
    };
  },
  methods: {
    routerSheb(row) {
      console.log(row.nub);
      //   for (let i in this.tableData) {
      //     let nub = this.tableData[i].nub;
      //     if(row.nub === nub){

      //     }
      //   }
      switch (row.nub) {
        case 1:
          this.$router.push({
            path: "/phone/dianjianwdx1",
          });
          break;
        case 2:
          this.$router.push({
            path: "/phone/dianjianylzj",
          });
          break;

        case 3:
          this.$router.push({
            path: "/phone/dianjianflzj",
          });
          break;

        case 4:
          this.$router.push({
            path: "/phone/dianjiantbj",
          });
          break;

        case 5:
          this.$router.push({
            path: "/phone/dianjianyrz",
          });
          break;

        case 6:
          this.$router.push({
            path: "/phone//dianjianfpl",
          });
          break;

        case 7:
          this.$router.push({
            path: "/phone/dianjianwdx2zdsx",
          });
          break;

        case 8:
          this.$router.push({
            path: "/phone/dianjianlxtsx",
          });
          break;

        case 9:
          this.$router.push({
            path: "/phone/dianjianzdsx",
          });
          break;

        case 10:
          this.$router.push({
            path: "/phone/dianjianwdx2",
          });
          break;

        case 11:
          this.$router.push({
            path: "/phone/dianjiangzfxj",
          });
          break;

        case 12:
          this.$router.push({
            path: "/phone/dianjianyzfxj",
          });
          break;

        case 13:
          this.$router.push({
            path: "/phone/dianjiancxdj",
          });
          break;

        case 14:
          this.$router.push({
            path: "/phone/dianjiangzj",
          });
          break;

        case 15:
          this.$router.push({
            path: "/phone/dianjianzlxt",
          });
          break;

        case 16:
          this.$router.push({
            path: "/phone/dianjianwdx2zdxx",
          });
          break;
      }
    },
  },
};
</script>

<style></style>
